package cn.edu.zust.zql.dao;

import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by Administrator on 2016/12/21.
 */
@Repository
public class DaoImpl implements Dao{

    @Resource(name = "sqlSessionTemplate")
    private SqlSessionTemplate sqlSessionTemplate;

    public Object findForObject(String str, Object obj){
        Object o = sqlSessionTemplate.selectOne(str, obj);


        return o;
    }

    public List findForList(String str, Object obj){
        return sqlSessionTemplate.selectList(str, obj);
    }

}
